package com.mall.mapper;

import com.mall.pojo.goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;

@Mapper
public interface GoodsMapper {
    @Select("select * from goods")
    public List<goods> findAll();
    @Select("select * from goods")
    public List<goods> findNew();
    @Select("select * from goods")
    public List<goods> findHot();
    @Select("select * from goods where id=#{id}")
    public goods findById(int id);
    @Select("select * from goods where subId=#{subId}")
    List<goods> findBySubId(int subId);
    @Select("select * from goods where parentId=#{parentId}")
    List<goods> findByParentId(int parentId);
}
